#!/usr/bin/env bash

#*********************
# Maxwell Introduction
#*********************
clear

printf "Hello $USER, my name is Maxwell."
espeak -s 60 "Hello, $USER my name is Maxwell."
printf "\n\n"
sleep 1

printf "I will help you build the Faridayix operating system."
espeak -s 60 "I will help you build the Faridayix operating system."
printf "\n\n"
sleep 1

#***********************************************
# Make Build Directory and File System Hierarchy
#***********************************************
printf "I will start by making the build directory."
espeak -s 60 "I will start by making the build directory."
printf "\n\n"
mkdir --verbose build
printf "\n"
sleep 1

printf "I will now make the file system hierarchy, the following are its directories in alphabetical order."
espeak -s "I will now make the file system hierarchy, the following are its directories in alphabetical order."
printf "\n\n"
sleep 1

printf "The binary directory."
espeak "The binary directory."
mkdir --verbose /bin/
printf "\n\n"
sleep 1

printf "The boot directory."
espeak "The boot directory."
mkdir --verbose /boot/
printf "\n\n"

printf "I will now make the boot defaults directory."
espeak "I will now make the boot defaults directory."
mkdir --verbose /boot/defaults/
printf "\n\n"

printf "I will now make the device directory."
espeak "I will now make the device directory."
mkdir --verbose /dev/
printf "\n\n"

printf "I will now make the etcetera directory."
espeak "I will now make the etcetera directory."
mkdir --verbose /etc/
printf "\n\n"

printf "I will now make the etcetera defaults directory."
espeak "I will now make the etcetera defaults directory."
mkdir --verbose /etc/defaults/
printf "\n\n"

printf "I will now make the ecetera mail directory."
espeak "I will now make the ecetera mail directory."
printf "\n\n"
mkdir --verbose /etc/mail/

mkdir --verbose /etc/namedb/

mkdir --verbose /etc/periodic/

mkdir --verbose /etc/ppp/

mkdir --verbose /mnt/

mkdir --verbose /proc/

mkdir --verbose /rescue/

mkdir --verbose /root/

mkdir --verbose /sbin/

mkdir --verbose /tmp/
printf "\n\n"

#***************************************
# Core GNUs Not UNIX Compiler Collection
#***************************************
printf "I will now download the compressed archive of the latest stable release of the core GNUs Not UNIX Compiler Collection."
espeak "I will now download the compressed archive of the latest stable release of the core GNUs Not UNIX Compiler Collection." 
printf "\n\n"
curl --verbos --location --remote-name ftp://ftp.gnu.org/gnu/gcc/gcc-4.4.2/gcc-core-4.4.2.tar.bz2
printf "\n\n"

printf "I will now uncompress and extract the archive of the latest stable release of the core GNUs Not UNIX Compiler Collection to the build directory."
espeak "I will now uncompress and extract the archive of the latest stable release of the core GNUs Not UNIX Compiler Collection to the build directory."
printf "\n\n"
tar --verbose --bzip2 --extract --file gcc-core-4.4.2.tar.bz2
printf "\n\n"

printf "I will now download, uncompress, and extract 

#*************
# Linux Kernel
#*************

# Download the source code to the latest stable release of the 2.6 Linux kernel.
curl --verbose --location --remote-name http://www.kernel.org/pub/linux/kernel/v2.4/linux-2.6.32.3.tar.bz2

# Uncompress and extract the latest stable release of the 2.6 Linux kernel.
tar --verbose --bzip2 --extract --file linux-2.6.32.3.tar.bz2

#*******************
# Bourne Again Shell
#*******************

# Download the source code to the latest stable release of the Bourne Again Shell.
curl --verbose --location --remote-name ftp://ftp.gnu.org/gnu/bash/bash-4.1.tar.gz

# Uncompress and extract the latest stable release of the Bourne Again Shell.
tar --verbose --gunzip --extract --file bash-4.1.tar.gz

# GNU Editing Macros

curl --verbose --location --remote-name ftp://ftp.gnu.org/gnu/emacs/emacs-23.1.tar.gz

tar --verbose --gunzip --extract --file emacs-23.1.tar.gz

curl --verbose --location --remote-name http://www.python.org/ftp/python/3.11/Python-3.1.1.tar.bz2

tar --verbose --bzip2 --extract --file Python-3.1.1.tar.bz2

curl --verbose --location --remote-name http://www.mercurial.selenic.com/release/mercurial-1.4.2.tar.gz

tar --verbose --bzip2 --extract --file mercurial-1.4.2.tar.gz
